<?php

// 密码登录
Route::post('/login/password', 'LoginController@login');

Route::group(['prefix' => 'other'], function () {
    Route::get('/config', 'OtherController@config');
});

// 标准图库
Route::group(['prefix' => 'series_gallery'], function () {
    Route::get('/', 'SeriesGalleryController@index');
    Route::get('/list', 'SeriesGalleryController@list');
    Route::get('/{id}', 'SeriesGalleryController@detail');
});
//新系列图库，旧系列图库改名标准图库
Route::group(['prefix' => 'new_series_gallery'], function () {
    Route::get('/', 'NewSeriesGalleryController@index');
    Route::get('/list', 'NewSeriesGalleryController@list');
    Route::get('/{id}', 'NewSeriesGalleryController@detail');
});

//以下是需要验证身份的
Route::group(['middleware' => ['auth:apiv2']], function () {
    //pdf上传
    Route::post('/upload/pdf', 'UploadController@pdfUpload');
    // 图片上传
    Route::post('/upload/image', 'UploadController@imageUpload');
    //前端直传文件需要用到的扮演角色
    Route::get('/upload/assumeRole', 'UploadController@assumeRole');

    //用户相关
    Route::group(['prefix' => 'member'], function () {
        Route::get('detail', 'MemberController@detail');
        Route::get('detail/avatar', 'MemberController@avatars');
        Route::post('detail/nickname', 'MemberController@nicknameChange');
        Route::post('detail/mobile', 'MemberController@mobileChange');
        Route::post('detail/avatar', 'MemberController@avatarChange');
    });

});
